package lec06.am;

import java.util.InputMismatchException;
import java.util.Scanner;

public class ExceptionDemo {
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);

		int n;

		try {
			n = cin.nextInt();
			System.out.println(1 / n);
			System.out.println(Math.sqrt(n));
			System.out.println(args[0]);
		} 
		catch (ArithmeticException e) {
			System.out.println("ArithmeticException happened!");
		} catch (InputMismatchException e) {
			System.out.println("InputMismatchException happened!");
		}catch (Exception e) {
			System.out.println("Unknow Exception happened!");
		}

		cin.close();
	}
}
